﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Xml.Serialization;
namespace XYZshell.Game.CardGameEngine
{
	/// <summary>
	/// 玩家
	/// </summary>
	[Serializable]
	public  class Player:GameObject 
	{
		public Player()
		{
			Hand = new Hand();
			Desktops = new List<Desktop>();
		}
		/// <summary>
		/// 玩家所拥有的桌面
		/// </summary>
		[XmlArrayItem]
		public List<Desktop> Desktops
		{
			get;
			set;
		}
		/// <summary>
		/// 玩家的手牌
		/// </summary>
		public Hand Hand
		{
			get;
			set;
		}

		/// <summary>
		/// 摸牌
		/// </summary>
		/// <param name="deck"></param>
		public void Siphon(Deck deck)
		{
			Card card= deck.Siphon();
			Hand.Cards.Add( card );
		}
	}
}
